package com.ht.module.file.controller;

import com.ht.config.log.annotation.SysLog;
import com.ht.constant.DicConstants;
import com.ht.module.file.entity.FileInfo;
import com.ht.util.JsonResult;
import com.ht.util.Pager;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ht.module.file.entity.FileTemporarily;
import com.ht.module.file.service.FileTemporarilyService;
import com.ht.util.*;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;


/**
 * <p>
 * 临时文件表 前端控制器
 * </p>
 *
 * @author hejialun
 * @since 2024-09-26
 */
@RestController
@RequestMapping("/file-temporarily")
public class FileTemporarilyController {

    
    @Autowired
    private FileTemporarilyService fileTemporarilyService;



    @ApiOperation("上传临时文件")
    @SysLog(msg = "上传临时文件", type = DicConstants.OperLogType.UPLOAD)
    @PostMapping("/uploadTemporarilyFile")
    public JsonResult uploadTemporarilyFile(@RequestParam("file") MultipartFile file, FileTemporarily en) {
        return JsonResult.success(fileTemporarilyService.uploadTemporarilyFile(file, en));
    }


}
